﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Statistics.aspx.vb" Inherits="_14073716_Prototype.Statistics" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p style="font-size: large; color: #0000FF">
        <br />
        Count of views on per food:</p>
    <p>
        <asp:Chart ID="Chart2" runat="server" DataSourceID="SqlDataSource1">
            <Series>
                <asp:Series Name="Series1" XValueMember="ChineseFoodName_English" 
                    YValueMembers="CountOfTravellerName">
                </asp:Series>
            </Series>
            <ChartAreas>
                <asp:ChartArea Name="ChartArea1">
                    <Area3DStyle Enable3D="True" />
                </asp:ChartArea>
            </ChartAreas>
        </asp:Chart>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ChineseFoodConn %>" 
            ProviderName="<%$ ConnectionStrings:ChineseFoodConn.ProviderName %>" 
            
            SelectCommand="SELECT * FROM [CountOfFoodAndView] ORDER BY [CountOfTravellerName] DESC, [ID]">
        </asp:SqlDataSource>
    </p>
    <p>
    </p>
    <p style="font-size: large; color: #008000">
        Show avgRating on per food:</p>
    <p>
        <asp:Chart ID="Chart3" runat="server" DataSourceID="SqlDataSource2" 
            Palette="Bright">
            <Series>
                <asp:Series Name="Series1" XValueMember="ChineseFoodName_English" 
                    YValueMembers="AvgOfRating">
                </asp:Series>
            </Series>
            <ChartAreas>
                <asp:ChartArea Name="ChartArea1">
                </asp:ChartArea>
            </ChartAreas>
        </asp:Chart>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ChineseFoodConn %>" 
            ProviderName="<%$ ConnectionStrings:ChineseFoodConn.ProviderName %>" 
            
            SelectCommand="SELECT * FROM [ChineseFoodAndAvgRating] ORDER BY [AvgOfRating] DESC, [ID]">
        </asp:SqlDataSource>
    </p>
    <p>
    </p>
    <p style="font-size: large; color: #A0522D">
        Show how many users liked per food:</p>
    <p>
        <asp:Chart ID="Chart4" runat="server" DataSourceID="SqlDataSource3" 
            Palette="Chocolate">
            <Series>
                <asp:Series ChartType="Area" Name="Series1" 
                    XValueMember="ChineseFoodName_English" YValueMembers="CountOfReader">
                </asp:Series>
            </Series>
            <ChartAreas>
                <asp:ChartArea Name="ChartArea1">
                    <Area3DStyle Enable3D="True" />
                </asp:ChartArea>
            </ChartAreas>
        </asp:Chart>
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ChineseFoodConn %>" 
            ProviderName="<%$ ConnectionStrings:ChineseFoodConn.ProviderName %>" 
            
            SelectCommand="SELECT * FROM [UserLikesView] ORDER BY [CountOfReader] DESC, [ID]">
        </asp:SqlDataSource>
    </p>
    <p>
    </p>
    <p style="color: #800080; font-size: large">
        How many comments per user:</p>
    <p>
        <asp:Chart ID="Chart5" runat="server" DataSourceID="SqlDataSource4" 
            Palette="Berry">
            <Series>
                <asp:Series ChartType="Bar" Name="Series1" XValueMember="Author" 
                    YValueMembers="NumComments">
                </asp:Series>
            </Series>
            <ChartAreas>
                <asp:ChartArea Name="ChartArea1">
                    <Area3DStyle Enable3D="True" />
                </asp:ChartArea>
            </ChartAreas>
        </asp:Chart>
        <asp:SqlDataSource ID="SqlDataSource4" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ChineseFoodConn %>" 
            ProviderName="<%$ ConnectionStrings:ChineseFoodConn.ProviderName %>" 
            
            SelectCommand="SELECT * FROM [NumberComments] ORDER BY [NumComments] DESC, [Author]"></asp:SqlDataSource>
    </p>
    <p>
    </p>
    <p style="font-size: large; color: #418CF0;">
        Number Of User Gender:</p>
    <p>
        <asp:Chart ID="Chart6" runat="server" DataSourceID="SqlDataSource5">
            <Series>
                <asp:Series ChartType="Pie" Name="Series1" XValueMember="Gender" 
                    YValueMembers="NumGender">
                </asp:Series>
            </Series>
            <ChartAreas>
                <asp:ChartArea Name="ChartArea1">
                    <Area3DStyle Enable3D="True" />
                </asp:ChartArea>
            </ChartAreas>
        </asp:Chart>
        <asp:SqlDataSource ID="SqlDataSource5" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ChineseFoodConn %>" 
            ProviderName="<%$ ConnectionStrings:ChineseFoodConn.ProviderName %>" 
            SelectCommand="SELECT * FROM [NumOfGender]"></asp:SqlDataSource>
    </p>
    <p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            BackColor="White" BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" 
            CellPadding="3" DataSourceID="SqlDataSource5" GridLines="Horizontal">
            <AlternatingRowStyle BackColor="#F7F7F7" />
            <Columns>
                <asp:BoundField DataField="Gender" HeaderText="Gender" 
                    SortExpression="Gender" />
                <asp:BoundField DataField="NumGender" HeaderText="NumGender" 
                    SortExpression="NumGender" />
            </Columns>
            <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
            <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
            <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
            <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
            <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
            <SortedAscendingCellStyle BackColor="#F4F4FD" />
            <SortedAscendingHeaderStyle BackColor="#5A4C9D" />
            <SortedDescendingCellStyle BackColor="#D8D8F0" />
            <SortedDescendingHeaderStyle BackColor="#3E3277" />
        </asp:GridView>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p style="font-size: large; color: #1C5E55">
        Tag and Food:</p>
    <p>
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource6" CellPadding="4" ForeColor="#333333" 
            GridLines="None">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:BoundField DataField="Tag" HeaderText="Tag" SortExpression="Tag" />
                <asp:BoundField DataField="ChineseFoodName_English" 
                    HeaderText="ChineseFoodName_English" SortExpression="ChineseFoodName_English" />
            </Columns>
            <EditRowStyle BackColor="#7C6F57" />
            <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#E3EAEB" />
            <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F8FAFA" />
            <SortedAscendingHeaderStyle BackColor="#246B61" />
            <SortedDescendingCellStyle BackColor="#D4DFE1" />
            <SortedDescendingHeaderStyle BackColor="#15524A" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource6" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ChineseFoodConn %>" 
            ProviderName="<%$ ConnectionStrings:ChineseFoodConn.ProviderName %>" 
            SelectCommand="SELECT * FROM [ChineseFoodTagView] ORDER BY [Tag], [ChineseFoodName_English]">
        </asp:SqlDataSource>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p style="font-size: large; color: #FF8000">
        Count of how many messages of per food:</p>
    <p>
        <asp:Chart ID="Chart7" runat="server" DataSourceID="SqlDataSource7" 
            Palette="EarthTones">
            <Series>
                <asp:Series Name="Series1" XValueMember="ChineseFoodName_English" 
                    YValueMembers="CountOfMessage">
                </asp:Series>
            </Series>
            <ChartAreas>
                <asp:ChartArea Name="ChartArea1">
                    <Area3DStyle Enable3D="True" />
                </asp:ChartArea>
            </ChartAreas>
        </asp:Chart>
        <asp:SqlDataSource ID="SqlDataSource7" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ChineseFoodConn %>" 
            ProviderName="<%$ ConnectionStrings:ChineseFoodConn.ProviderName %>" 
            
            SelectCommand="SELECT * FROM [FoodAndCountOfMessages] ORDER BY [CountOfMessage] DESC, [ChineseFoodName_English]"></asp:SqlDataSource>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
</asp:Content>
